<html>
    <head>
        <title>LEdgeInfo</title>
        <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    </head>
    <body text="#000000" bgColor="#ffffff">
        <h1>LEdgeInfo</h1>
        <table cellSpacing="1" cellPadding="2" width="100%" border="0">
            <tr>
                <td bgColor="#e6e6e6"><b>Description</b></td>
                <td bgColor="#e6e6e6">Data associated to edges of a graph</td>
            </tr>
            <tr>
                
    <td bgColor="#e6e6e6"><b>Header file</b></td>
                
    <td bgColor="#e6e6e6"><tt>LEdgeInfo.h</tt></td>
            </tr>
            <tr>
                <td bgColor="#e6e6e6"><b>Author</b></td>
                <td bgColor="#e6e6e6"><A href="mailto:thepomy@tin.it">Stefano Emiliozzi</A>, <A href="http://www.dis.uniroma1.it/~demetres">
                        Camil Demetrescu</A></td>
            </tr>
            <tr>
                <td bgColor="#e6e6e6"><b>Created</b></td>
                <td bgColor="#e6e6e6">Jan 17, 2003</td>
            </tr>
            <tr>
                <td bgColor="#e6e6e6"><b>Last updated</b></td>
                
    <td bgColor="#e6e6e6">Sep 26, 2003</td>
            </tr>
        </table>
        <p>&nbsp;</p>
        <h2>Contents</h2>
        <ul>
            <li>
                <A href="#intro">Introduction</A>
            <li>
                <A href="#interface">Interface</A>
            <li>
                <A href="#apiref">API reference</A>
            <li>
                <A href="#history">Revision history</A></li></ul>
        <hr>
        <h2><b><a name="intro"></a>Introduction</b></h2>
        The component <tt>LEdgeInfo</tt> is used to associate data to edges of 
a graph; each graph is represented using component <tt>LGraph</tt> and can have 
multiple <tt>LEdgeInfo</tt> associated, but a <tt>LEdgeInfo</tt> can be associated 
only to one <tt>LGraph</tt>. 
<p>
            <hr>
            <h2><b><a name="interface"></a>Interface</b></h2>
            <table cellSpacing="1" cellPadding="4" width="100%" border="0">
                <tr>
                    <td bgColor="#bbbbbb" colSpan="2">
                        <h4>Constants</h4>
                    </td>
                </tr>
                <tr>
                    
    <td colSpan="2"><tt>LEdgeInfo_ID<br>
      LEdgeInfo_BASE_TYPE_MISMATCH</tt> </td>
                </tr>
            </table>
            <p><table cellSpacing="1" cellPadding="4" width="100%" border="0">
                <tr>
                    <td bgColor="#bbbbbb" colSpan="2">
                        <h4>Types</h4>
                    </td>
                </tr>
                <tr>
                    
    <td colSpan="2">
      <pre>LEdgeInfo
void (*LEdgeInfo_THandler)(LEdgeInfo* This, LGraph_TEdge* inEdge)</pre>
      </td>
                </tr>
            </table>
            <p>
<table cellSpacing="1" cellPadding="4" width="100%" border="0">
  <tr> 
    <td bgColor="#bbbbbb" colSpan="2"> 
      <h4>Functions</h4>
    </td>
  </tr>
  <tr> 
    <td colSpan="2"> 
      <pre>LEdgeInfo*  LEdgeInfo_New                   (LGraph* inGraph, LType_TType inType)<br>LEdgeInfo*  LEdgeInfo_NewCustom             (LGraph* inGraph, ui4 inItemSize)<br>void        LEdgeInfo_Delete                (LEdgeInfo** ThisA)<br>void        LEdgeInfo_AssignItemAt          (LEdgeInfo* This, LGraph_TEdge* inEdge, const void* inItem)<br>Bool        LEdgeInfo_FetchItemAt           (LEdgeInfo* This, LGraph_TEdge* inEdge, void* outItem)<br>void        LEdgeInfo_InstallDelEdgeHandler (LEdgeInfo* This, LEdgeInfo_THandler inDealloc)<br>void        LEdgeInfo_InstallNewEdgeHandler (LEdgeInfo* This, LEdgeInfo_THandler inAlloc)<br>LType_TType LEdgeInfo_GetBaseType           (LEdgeInfo* This)<br>ui4         LEdgeInfo_GetUsedMem            (LEdgeInfo* This)</pre>
    </td>
  </tr>
</table>
            
<p><table cellspacing="1" cellpadding="4" width="100%" border="0">
  <tr> 
    <td bgcolor="#bbbbbb" colspan="2"> 
      <h4>Macros</h4>
    </td>
  </tr>
  <tr> 
    <td colspan="2"> 
      <pre>
LEdgeInfo_UI1At     (LEdgeInfo* This, LGraph_TEdge* inEdge)
LEdgeInfo_UI2At     (LEdgeInfo* This, LGraph_TEdge* inEdge)
LEdgeInfo_UI4At     (LEdgeInfo* This, LGraph_TEdge* inEdge)
LEdgeInfo_I1At      (LEdgeInfo* This, LGraph_TEdge* inEdge)
LEdgeInfo_I2At      (LEdgeInfo* This, LGraph_TEdge* inEdge)
LEdgeInfo_I4At      (LEdgeInfo* This, LGraph_TEdge* inEdge)
LEdgeInfo_F4At      (LEdgeInfo* This, LGraph_TEdge* inEdge)
LEdgeInfo_F8At      (LEdgeInfo* This, LGraph_TEdge* inEdge)
LEdgeInfo_BoolAt    (LEdgeInfo* This, LGraph_TEdge* inEdge)
LEdgeInfo_PointerAt (LEdgeInfo* This, LGraph_TEdge* inEdge)
</pre>
    </td>
  </tr>
</table>
<p><hr>
            <h2><a name="apiref"></a>API Reference</h2>
            
<table cellSpacing="1" cellPadding="4" width="100%">
  <tr bgcolor="#bbbbbb"> 
    <td><b>Macro</b></td>
    <td><b>Arguments</b></td>
    <td><b>Description</b></td>
  </tr>
  <tr> 
    <td bgColor="#e6e6e6"> 
      <pre>UI1At</pre>
    </td>
    <td bgColor="#e6e6e6"><tt>LEdgeInfo* This, LGraph_TEdge* inEdge</tt></td>
    <td bgColor="#e6e6e6"><tt>ui1</tt> lvalue associated to edge <tt>inEdge</tt></td>
  </tr>
  <tr> 
    <td bgColor="#e6e6e6"> 
      <pre>UI2At</pre>
    </td>
    <td bgcolor="#e6e6e6"><tt>LEdgeInfo* This, LGraph_TEdge* inEdge</tt></td>
    <td bgColor="#e6e6e6"><tt>ui2</tt> lvalue associated to edge <tt>inEdge</tt></td>
  </tr>
  <tr> 
    <td bgColor="#e6e6e6"> 
      <pre>UI4At</pre>
    </td>
    <td bgcolor="#e6e6e6"><tt>LEdgeInfo* This, LGraph_TEdge* inEdge</tt></td>
    <td bgColor="#e6e6e6"><tt>ui4</tt> lvalue associated to edge <tt>inEdge</tt></td>
  </tr>
  <tr> 
    <td bgColor="#e6e6e6"> 
      <pre>I1At</pre>
    </td>
    <td bgcolor="#e6e6e6"><tt>LEdgeInfo* This, LGraph_TEdge* inEdge</tt></td>
    <td bgColor="#e6e6e6"><tt>i1</tt> lvalue associated to edge <tt>inEdge</tt></td>
  </tr>
  <tr> 
    <td bgColor="#e6e6e6"> 
      <pre>I2At</pre>
    </td>
    <td bgcolor="#e6e6e6"><tt>LEdgeInfo* This, LGraph_TEdge* inEdge</tt></td>
    <td bgColor="#e6e6e6"><tt>i2</tt> lvalue associated to edge <tt>inEdge</tt></td>
  </tr>
  <tr> 
    <td bgColor="#e6e6e6"> 
      <pre>I4At</pre>
    </td>
    <td bgcolor="#e6e6e6"><tt>LEdgeInfo* This, LGraph_TEdge* inEdge</tt></td>
    <td bgColor="#e6e6e6"><tt>i4</tt> lvalue associated to edge <tt>inEdge</tt></td>
  </tr>
  <tr> 
    <td bgColor="#e6e6e6"> 
      <pre>F4At</pre>
    </td>
    <td bgcolor="#e6e6e6"><tt>LEdgeInfo* This, LGraph_TEdge* inEdge</tt></td>
    <td bgColor="#e6e6e6"><tt>f4</tt> lvalue associated to edge <tt>inEdge</tt></td>
  </tr>
  <tr> 
    <td bgColor="#e6e6e6"> 
      <pre>F8At</pre>
    </td>
    <td bgcolor="#e6e6e6"><tt>LEdgeInfo* This, LGraph_TEdge* inEdge</tt></td>
    <td bgColor="#e6e6e6"><tt>f8</tt> lvalue associated to edge <tt>inEdge</tt></td>
  </tr>
  <tr> 
    <td bgColor="#e6e6e6"> 
      <pre>BoolAt</pre>
    </td>
    <td bgcolor="#e6e6e6"><tt>LEdgeInfo* This, LGraph_TEdge* inEdge</tt></td>
    <td bgColor="#e6e6e6"><tt>Bool</tt> lvalue associated to edge <tt>inEdge</tt></td>
  </tr>
  <tr> 
    <td bgColor="#e6e6e6"> 
      <pre>PointerAt</pre>
    </td>
    <td bgcolor="#e6e6e6"><tt>LEdgeInfo* This, LGraph_TEdge* inEdge</tt></td>
    <td bgColor="#e6e6e6"><tt>void*</tt> lvalue associated to edge <tt>inEdge</tt></td>
  </tr>
</table>
            <br>
            
<table cellSpacing="1" cellPadding="4" width="100%">
  <tr bgcolor="#bbbbbb"> 
    <td><b>Function</b></td>
    <td><b>Arguments</b></td>
    <td><b>Description</b></td>
    <td><b>Returns</b></td>
    <td><b>Throws</b></td>
  </tr>
  <tr> 
    <td bgColor="#e6e6e6"><tt><font color="#ff0000">New</font></tt></td>
    <td bgColor="#e6e6e6"> 
      <pre>
LGraph*      inGraph
LType_TType* inType
</pre>
    </td>
    <td bgColor="#e6e6e6">Creates an object containing an edgeinfo associated 
      to <tt>inGraph</tt>. The base type of the information is given by the value 
      of <tt>inType</tt>. The constructor makes room for all the edges of the 
      graph.<font color="#ff0000"> Caller is responsible of dellocating the created 
      object using <tt>LEdgeInfo_Delete</tt>.</font> </td>
    <td bgColor="#e6e6e6"> 
      <p><tt>LEdgeInfo*</tt></p>
      <p>pointer to the newly created object</p>
    </td>
    <td bgColor="#e6e6e6">-</td>
  </tr>
  <tr> 
    <td bgColor="#e6e6e6"><tt><font color="#ff0000">NewCustom</font></tt></td>
    <td bgColor="#e6e6e6"> 
      <pre>
LGraph* inGraph
ui4     inItemSize
</pre>
    </td>
    <td bgColor="#e6e6e6">Creates an object containing an edgeinfo associated 
      to <tt>inGraph</tt>. The base type size of the information is given by the 
      value of <tt>inItemSize</tt>. The constructor makes room for all the edges 
      of the graph.<font color="#ff0000"> Caller is responsible of dellocating 
      the created object using <tt>LEdgeInfo_Delete</tt>.</font> </td>
    <td bgColor="#e6e6e6"> 
      <p><tt>LEdgeInfo*</tt></p>
      <p>pointer to the newly created object</p>
    </td>
    <td bgColor="#e6e6e6">-</td>
  </tr>
  <tr> 
    <td bgColor="#e6e6e6"><tt>Delete</tt></td>
    <td bgColor="#e6e6e6"><tt>LEdgeInfo** ThisA</tt></td>
    <td bgColor="#e6e6e6">Releases object <tt>*ThisA</tt>. <tt>*ThisA</tt> is 
      set to <tt>NULL</tt>. </td>
    <td bgColor="#e6e6e6"><tt>void</tt></td>
    <td bgColor="#e6e6e6">-</td>
  </tr>
  <tr> 
    <td bgColor="#e6e6e6"><tt>LEdgeInfo_ItemAt</tt></td>
    <td bgColor="#e6e6e6"> 
      <pre>
LEdgeInfo*    This
LGraph_TEdge* inEdge
</pre>
    </td>
    <td bgColor="#e6e6e6">Returns a pointer (that has to be typecasted) to the 
      info associated to the edge <tt>inEdge</tt></td>
    <td bgColor="#e6e6e6"><tt>void*</tt></td>
    <td bgColor="#e6e6e6">-</td>
  </tr>
  <tr> 
    <td bgColor="#e6e6e6"><tt>AssignItemAt</tt></td>
    <td noWrap bgColor="#e6e6e6"> 
      <pre>
LEdgeInfo*    This
LGraph_TEdge* inEdge
const void*   inItem
</pre>
    </td>
    <td bgColor="#e6e6e6">Assigns the data pointed by <tt>inItem</tt> to the edge 
      <tt>inEdge</tt></td>
    <td bgColor="#e6e6e6"><tt>void</tt></td>
    <td bgColor="#e6e6e6">-</td>
  </tr>
  <tr> 
    <td bgColor="#e6e6e6"><tt>FetchItemAt</tt></td>
    <td bgColor="#e6e6e6"> 
      <pre>
LEdgeInfo*    This
LGraph_TEdge* inEdge
void*         outItem
</pre>
    </td>
    <td bgColor="#e6e6e6">Puts the data associated to edge <tt>inEdge</tt> to 
      the memory pointed by <tt>outItem</tt>. It returns TRUE if the data in <tt>outItem</tt> 
      are valid, FALSE otherwise</td>
    <td bgColor="#e6e6e6"><tt>Bool</tt></td>
    <td bgColor="#e6e6e6">-</td>
  </tr>
  <tr> 
    <td bgColor="#e6e6e6" height="39"><tt>InstallDelEdgeHandler</tt></td>
    <td noWrap bgColor="#e6e6e6" height="39"> 
      <pre>LEdgeInfo*         This
LEdgeInfo_THandler inDealloc</pre>
    </td>
    <td bgColor="#e6e6e6" height="39">Installs a handler that is executed whenever 
      an edge is removed from the graph associated with This. The handler is called 
      before removing the edge.</td>
    <td bgColor="#e6e6e6" height="39">-</td>
    <td bgColor="#e6e6e6" height="39">-</td>
  </tr>
  <tr> 
    <td bgcolor="#e6e6e6" height="39"><tt>InstallNewEdgeHandler</tt></td>
    <td noWrap bgcolor="#e6e6e6" height="39"> 
      <pre>LEdgeInfo*         This
LEdgeInfo_THandler inAlloc</pre>
    </td>
    <td bgcolor="#e6e6e6" height="39">Installs a handler that is executed whenever 
      a new edge is added to the graph associated with This. The handler is called 
      after the edge has been inserted.</td>
    <td bgcolor="#e6e6e6" height="39">-</td>
    <td bgcolor="#e6e6e6" height="39">-</td>
  </tr>
  <tr> 
    <td bgColor="#e6e6e6"><tt>GetBaseType</tt></td>
    <td noWrap bgColor="#e6e6e6"><tt>LEdgeInfo* This</tt></td>
    <td bgColor="#e6e6e6">Returns the base type of the <tt>LEdgeInfo</tt></td>
    <td bgColor="#e6e6e6"><tt>LType_TType</tt></td>
    <td bgColor="#e6e6e6">-</td>
  </tr>
  <tr> 
    <td bgColor="#e6e6e6"><tt>GetUsedMem</tt></td>
    <td noWrap bgColor="#e6e6e6"><tt>LEdgeInfo* This</tt></td>
    <td bgColor="#e6e6e6">Returns the total memory usage of the object.</td>
    <td bgColor="#e6e6e6"><tt>ui4</tt></td>
    <td bgColor="#e6e6e6">-</td>
  </tr>
</table>
        <p>
            <hr>
            <h2><a name="history"></a>Revision history</h2>
            
<ul>
  <li>Jan 17, 2003: created</li>
  <li>Jan 19, 2003: added the exception <tt>LEdgeInfo_BASE_TYPE_MISMATCH</tt></li>
  <li>Jan 20, 2003: changed <tt> LEdgeInfo_ItemAt()</tt> from function to macro, 
    to speed-up access</li>
  <li>Mar 04, 2003: added <tt>LEdgeInfo_GetBaseType(LEdgeInfo* This)</tt></li>
  <li>Mar 18, 2003: added <tt>LEdgeInfo_GetUsedMem(LEdgeInfo* This)</tt></li>
  <li>Sep 26, 2003: updated.</li>
</ul>
            </body>
</html>
